<template>
<div>
	<button @click="changeTab(Comp1)">ChangeComp1</button>
	<button @click="changeTab(Comp2)">ChangeComp2</button>
	<button @click="changeTab(Comp3)">ChangeComp3</button>
	<component :is="tab"/>
</div>
</template>
<script setup>
import Comp1 from "../components/Component/Comp1.vue"
import Comp2 from "../components/Component/Comp2.vue"
import Comp3 from "../components/Component/Comp3.vue"
import {ref,markRaw} from "vue"
const tab=ref(markRaw(Comp1))
const changeTab=(comp)=>{
	tab.value=comp
}
</script>